home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibmusic.pqs / pibmusic.pas
Pascal/Delphi Source File  |  1985-01-25  |  25KB  |  564 lines

  1. (*$R-,V-,C-,U-*)
  2. Program PibMusic;
  3.  
  4. (* ------------------------------------------------------------------------ *)
  5. (*                                                                          *)
  6. (*   Program:  PibMusic                                                     *)
  7. (*                                                                          *)
  8. (*   Purpose:  Demonstrates the enclosed routine PibPlay, which emulates    *)
  9. (*             the Microsoft Basic PLAY statement.  (See the Basic manual   *)
  10. (*             for details.)                                                *)
  11. (*                                                                          *)
  12. (*   Author:   Philip R. Burns                                              *)
  13. (*   Date:     January 25, 1985                                             *)
  14. (*   Version:  1.0                                                          *)
  15. (*                                                                          *)
  16. (*   Use:                                                                   *)
  17. (*                                                                          *)
  18. (*      Call PibPlaySet to initialize global play variables.                *)
  19. (*      Call PibPlay to play a line of music.                               *)
  20. (*                                                                          *)
  21. (*   Remarks:  You are free to use this routine is your own code.  If you   *)
  22. (*             find any bugs or have suggestions for improvements, please   *)
  23. (*             leave them for me on one of the following two Chicago BBSs:  *)
  24. (*                                                                          *)
  25. (*                Gene Plantz's IBBS    (312) 882 4227                      *)
  26. (*                Ron Fox's RBBS        (312) 940 6496                      *)
  27. (*                                                                          *)
  28. (*             Thanks.                                                      *)
  29. (*                                                                          *)
  30. (*             Note: This code ignores requests for buffered music.         *)
  31. (*                                                                          *)
  32. (* ------------------------------------------------------------------------ *)
  33.  
  34.  
  35.                    (* Global Variable for PibMusic *)
  36. Var
  37.                                    (* String containing music   *)
  38.    S   : String[255];
  39.  
  40.  
  41. (* ------------------------------------------------------------------------ *)
  42. (*               PibPlaySet --- Set up to play music                        *)
  43. (*               PibPlay    --- Play Music through Speaker                  *)
  44. (* ------------------------------------------------------------------------ *)
  45.  
  46.  
  47.                    (* Global Type for PibPlay Procedure *)
  48. Type
  49.    SoundStr = String[255];
  50.  
  51.                    (* Global Variables for PibPlay Procedure *)
  52. Var
  53.                                    (* Current Octave for Note *)
  54.    Note_Octave   : Integer;
  55.                                    (* Fraction of duration given to note *)
  56.    Note_Fraction : Real;
  57.                                    (* Duration of note *)
  58.    Note_Duration : Integer;
  59.                                    (* Length of note *)
  60.    Note_Length   : Real;
  61.                                    (* Length of quarter note (principal beat) *)
  62.    Note_Quarter  : Real;
  63.  
  64.  
  65. Procedure PibPlaySet;
  66.  
  67. (* ------------------------------------------------------------------------ *)
  68. (*                                                                          *)
  69. (*   Procedure:  PibPlaySet                                                 *)
  70. (*                                                                          *)
  71. (*   Purpose:    Sets up to play music though PC's speaker                  *)
  72. (*                                                                          *)
  73. (*   Calling Sequence:                                                      *)
  74. (*                                                                          *)
  75. (*      PibPlaySet;                                                         *)
  76. (*                                                                          *)
  77. (*   Calls:  None                                                           *)
  78. (*                                                                          *)
  79. (* ------------------------------------------------------------------------ *)
  80.  
  81. Begin (* PibPlaySet *)
  82.  
  83.                                    (* Default Octave *)
  84.    Note_Octave   := 4;
  85.                                    (* Default sustain is semi-legato *)
  86.    Note_Fraction := 0.875;
  87.                                    (* Note is quarter note by default *)
  88.    Note_Length   := 0.25;
  89.                                    (* Moderato pace by default *)
  90.    Note_Quarter  := 500.0;
  91.  
  92. End   (* PibPlaySet *);
  93.  
  94.  
  95. Procedure PibPlay( S : SoundStr );
  96.  
  97. (* ------------------------------------------------------------------------ *)
  98. (*                                                                          *)
  99. (*   Procedure:  PibPlay                                                    *)
  100. (*                                                                          *)
  101. (*   Purpose:    Play music though PC's speaker                             *)
  102. (*                                                                          *)
  103. (*   Calling Sequence:                                                      *)
  104. (*                                                                          *)
  105. (*      PibPlay( Music_String : SoundStr );                                 *)
  106. (*                                                                          *)
  107. (*         Music_String --- The string containing the encoded music to be   *)
  108. (*                          played.  The format is the same as that of the  *)
  109. (*                          MicroSoft Basic PLAY Statement.  The string     *)
  110. (*                          must be <= 254 characters in length.            *)
  111. (*                                                                          *)
  112. (*   Calls:  Sound                                                          *)
  113. (*           GetInt  (Internal)                                             *)
  114. (*                                                                          *)
  115. (*   Remarks:  The characters accepted by this routine are:                 *)
  116. (*                                                                          *)
  117. (*             A - G       Musical Notes                                    *)
  118. (*             # or +      Following A - G note,  indicates sharp           *)
  119. (*             -           Following A - G note,  indicates flat            *)
  120. (*             <           Move down one octave                             *)
  121. (*             >           Move up one octave                               *)
  122. (*             .           Dot previous note (extend note duration by 3/2)  *)
  123. (*             MN          Normal duration (7/8 of interval between notes)  *)
  124. (*             MS          Staccato duration                                *)
  125. (*             ML          Legato duration                                  *)
  126. (*             Ln          Length of note (n=1-64; 1=whole note,            *)
  127. (*                                         4=quarter note, etc.)            *)
  128. (*             Pn          Pause length (same n values as Ln above)         *)
  129. (*             Tn          Tempo, n=notes/minute (n=32-255, default n=120)  *)
  130. (*             On          Octave number (n=0-6, default n=4)               *)
  131. (*             Nn          Play note number n (n=0-84)                      *)
  132. (*                                                                          *)
  133. (*             The following two commands are IGNORED by PibPlay:           *)
  134. (*                                                                          *)
  135. (*             MF          Complete note before continuing                  *)
  136. (*             MB          Another process may begin before speaker is      *)
  137. (*                         finished playing note                            *)
  138. (*                                                                          *)
  139. (*   IMPORTANT --- PibPlaySet MUST have been called at least once before    *)
  140. (*                 this routine is called.                                  *)
  141. (*                                                                          *)
  142. (* ------------------------------------------------------------------------ *)
  143.  
  144. Const
  145.                                    (* Offsets in octave of natural notes *)
  146.  
  147.    Note_Offset   : Array[ 'A'..'G' ] Of Integer
  148.                    = ( 9, 11, 0, 2, 4, 5, 7 );
  149.  
  150.                                    (* Frequencies for 7 octaves *)
  151.  
  152.    Note_Freqs: Array[ 0 .. 84 ] Of Integer
  153.                =
  154. (*
  155.       C    C#     D    D#     E     F    F#     G    G#     A    A#     B
  156. *)
  157. (     0,
  158.      65,   69,   73,   78,   82,   87,   92,   98,  104,  110,  116,  123,
  159.     131,  139,  147,  156,  165,  175,  185,  196,  208,  220,  233,  247,
  160.     262,  278,  294,  312,  330,  350,  370,  392,  416,  440,  466,  494,
  161.     524,  556,  588,  624,  660,  700,  740,  784,  832,  880,  932,  988,
  162.    1048, 1112, 1176, 1248, 1320, 1400, 1480, 1568, 1664, 1760, 1864, 1976,
  163.    2096, 2224, 2352, 2496, 2640, 2800, 2960, 3136, 3328, 3520, 3728, 3952,
  164.    4192, 4448, 4704, 4992, 5280, 5600, 5920, 6272, 6656, 7040, 7456, 7904  );
  165.  
  166.    Quarter_Note = 0.25;            (* Length of a quarter note *)
  167.  
  168.  
  169. Var
  170.                                    (* Frequency of note to be played *)
  171.    Play_Freq     : Integer;
  172.  
  173.                                    (* Duration to sound note *)
  174.    Play_Duration : Integer;
  175.  
  176.                                    (* Duration of rest after a note *)
  177.    Rest_Duration : Integer;
  178.  
  179.                                    (* Offset in Music string *)
  180.    I             : Integer;
  181.                                    (* Current character in music string *)
  182.    C             : Char;
  183.                                    (* Note Frequencies *)
  184.  
  185.    Freq          : Array[ 0 .. 6 , 0 .. 11 ] Of Integer ABSOLUTE Note_Freqs;
  186.  
  187.    N             : Integer;
  188.    XN            : Real;
  189.    K             : Integer;
  190.  
  191. Function GetInt : Integer;
  192.  
  193. (*   --- Get integer from music string --- *)
  194.  
  195. Var
  196.    N : Integer;
  197.  
  198. Begin (* GetInt *)
  199.  
  200.    N := 0;
  201.  
  202.    While( S[I] In ['0'..'9'] ) Do
  203.       Begin
  204.          N := N * 10 + ORD( S[I] ) - ORD('0');
  205.          I := I + 1;
  206.       End;
  207.  
  208.    I      := I - 1;
  209.  
  210.    GetInt := N;
  211.  
  212. End   (* GetInt *);
  213.  
  214.  
  215. Begin (* PibPlay *)
  216.                                    (* Append blank to end of music string *)
  217.    S := S + ' ';
  218.                                    (* Point to first character in music *)
  219.    I := 1;
  220.                                    (* Begin loop over music string *)
  221.    While( I < LENGTH( S ) ) Do
  222.  
  223.       Begin (* Interpret Music *)
  224.                                    (* Get next character in music string *)
  225.          C := Upcase(S[I]);
  226.                                    (* Interpret it                       *)
  227.          Case C Of
  228.  
  229.             'A'..'G' : Begin (* A Note *)
  230.  
  231.                           N         := Note_Offset[ C ];
  232.  
  233.                           Play_Freq := Freq[ Note_Octave , N ];
  234.  
  235.                           XN := Note_Quarter * ( Note_Length / Quarter_Note );
  236.  
  237.                           Play_Duration := Trunc( XN * Note_Fraction );
  238.  
  239.                           Rest_Duration := Trunc( XN * ( 1.0 - Note_Fraction ) );
  240.  
  241.                                    (* Check for sharp/flat *)
  242.  
  243.                           If S[I+1] In ['#','+','-' ] Then
  244.                              Begin
  245.  
  246.                                 I := I + 1;
  247.  
  248.                                 Case S[I] OF
  249.                                    '#' : Play_Freq :=
  250.                                             Freq[ Note_Octave , N + 1 ];
  251.                                    '+' : Play_Freq :=
  252.                                             Freq[ Note_Octave , N + 1 ];
  253.                                    '-' : Play_Freq :=
  254.                                             Freq[ Note_Octave , N - 1 ];
  255.                                    Else  ;
  256.                                 End (* Case *);
  257.  
  258.                              End;
  259.  
  260.                                    (* Check for note length *)
  261.  
  262.                           If S[I+1] In ['0'..'9'] Then
  263.                              Begin
  264.  
  265.                                 I  := I + 1;
  266.                                 N  := GetInt;
  267.                                 XN := ( 1.0 / N ) / Quarter_Note;
  268.  
  269.                                 Play_Duration :=
  270.                                     Trunc( Note_Fraction * Note_Quarter * XN );
  271.  
  272.                                 Rest_Duration :=
  273.                                    Trunc( ( 1.0 - Note_Fraction ) *
  274.                                           Xn * Note_Quarter );
  275.  
  276.                              End;
  277.                                    (* Check for dotting *)
  278.  
  279.                              If S[I+1] = '.' Then
  280.                                 Begin
  281.  
  282.                                    XN := 1.0;
  283.  
  284.                                    While( S[I+1] = '.' ) Do
  285.                                       Begin
  286.                                          XN := XN * 1.5;
  287.                                          I  := I + 1;
  288.                                       End;
  289.  
  290.                                    Play_Duration :=
  291.                                        Trunc( Play_Duration * XN );
  292.  
  293.                                 End;
  294.  
  295.                                        (* Play the note *)
  296.  
  297.                           Sound( Play_Freq );
  298.                           Delay( Play_Duration );
  299.                           NoSound;
  300.                           Delay( Rest_Duration );
  301.  
  302.                        End   (* A Note *);
  303.  
  304.             'M'      : Begin (* 'M' Commands *)
  305.  
  306.                           I := I + 1;
  307.                           C := S[I];
  308.  
  309.                           Case C Of
  310.  
  311.                              'F' : ;
  312.                              'B' : ;
  313.                              'N' : Note_Fraction := 0.875;
  314.                              'L' : Note_Fraction := 1.000;
  315.                              'S' : Note_Fraction := 0.750;
  316.                              Else ;
  317.  
  318.                           End (* Case *);
  319.  
  320.  
  321.                        End   (* 'M' Commands *);
  322.  
  323.             'O'      : Begin (* Set Octave *)
  324.  
  325.                           I := I + 1;
  326.                           N := ORD( S[I] ) - ORD('0');
  327.  
  328.                           If ( N < 0 ) OR ( N > 6 ) Then N := 4;
  329.  
  330.                           Note_Octave := N;
  331.  
  332.                        End   (* Set Octave *);
  333.  
  334.             '<'      : Begin (* Drop an octave *)
  335.  
  336.                           If Note_Octave > 0 Then
  337.                              Note_Octave := Note_Octave - 1;
  338.  
  339.                        End   (* Drop an octave *);
  340.  
  341.             '>'      : Begin (* Ascend an octave *)
  342.  
  343.                           If Note_Octave < 6 Then
  344.                              Note_Octave := Note_Octave + 1;
  345.  
  346.                        End   (* Ascend an octave *);
  347.  
  348.             'N'      : Begin (* Play Note N *)
  349.  
  350.                           I := I + 1;
  351.  
  352.                           N := GetInt;
  353.  
  354.                           If ( N > 0 ) AND ( N <= 84 ) Then
  355.                              Begin
  356.  
  357.                                 Play_Freq    := Note_Freqs[ N ];
  358.  
  359.                                 XN           := Note_Quarter *
  360.                                                 ( Note_Length / Quarter_Note );
  361.  
  362.                                 Play_Duration := Trunc( XN * Note_Fraction );
  363.  
  364.                                 Rest_Duration := Trunc( XN * ( 1.0 - Note_Fraction ) );
  365.  
  366.                              End
  367.  
  368.                           Else If ( N = 0 ) Then
  369.                              Begin
  370.  
  371.                                 Play_Freq     := 0;
  372.                                 Play_Duration := 0;
  373.                                 Rest_Duration :=
  374.                                    Trunc( Note_Fraction * Note_Quarter *
  375.                                           ( Note_Length / Quarter_Note ) );
  376.  
  377.                              End;
  378.  
  379.                           Sound( Play_Freq );
  380.                           Delay( Play_Duration );
  381.                           NoSound;
  382.                           Delay( Rest_Duration );
  383.  
  384.                        End   (* Play Note N *);
  385.  
  386.             'L'      : Begin (* Set Length of Notes *)
  387.  
  388.                           I := I + 1;
  389.                           N := GetInt;
  390.  
  391.                           If N > 0 Then Note_Length := 1.0 / N;
  392.  
  393.                        End   (* Set Length of Notes *);
  394.  
  395.             'T'      : Begin (* # of quarter notes in a minute *)
  396.  
  397.                           I := I + 1;
  398.                           N := GetInt;
  399.  
  400.                           Note_Quarter := ( 1092.0 / 18.2 / N ) * 1000.0;
  401.  
  402.                        End   (* # of quarter notes in a minute *);
  403.  
  404.             'P'      : Begin (* Pause *)
  405.  
  406.                           I := I + 1;
  407.                           N := GetInt;
  408.  
  409.                           If ( N < 1 ) Then N := 1
  410.                           Else If ( N > 64 ) Then N := 64;
  411.  
  412.                           Play_Freq     := 0;
  413.                           Play_Duration := 0;
  414.                           Rest_Duration :=
  415.                              Trunc( ( ( 1.0 / N ) / Quarter_Note )
  416.                                     * Note_Quarter );
  417.  
  418.                           Sound( Play_Freq );
  419.                           Delay( Play_Duration );
  420.                           NoSound;
  421.                           Delay( Rest_Duration );
  422.  
  423.                        End   (* Pause *);
  424.  
  425.             Else
  426.                (* Ignore other stuff *);
  427.  
  428.          End (* Case *);
  429.  
  430.          I := I + 1;
  431.  
  432.        End  (* Interpret Music *);
  433.  
  434.                                    (* Make sure sound turned off when through *)
  435.    NoSound;
  436.  
  437. End   (* PibPlay *);
  438.  
  439.  
  440. Begin (* PibMusic *)
  441.                                    (* Play Happy Birthday as example *)
  442.  
  443.    Writeln(' Playing Happy Birthday ... ');
  444.  
  445.    PibPlaySet;
  446.    PibPlay('MBT120L4MFMNO4C8C8DCFE2C8C8DCGF2C8C8O5CO4A F E D2T90 B-8 B-8 A F G F2');
  447.  
  448.    Delay( 1000 );
  449.                                    (* And Broadway *)
  450.  
  451.    Writeln(' Playing Broadway ... ');
  452.  
  453.    PibPlaySet;
  454.    PibPlay('MSO3L16EL6EL16EL4EL4EL8EL4DL2FP4P16L16DL6DL16DL4DL4DL4DL2CP4P8P16'+
  455.            'EL6EL16EL4EL4EL8EL4DL2FP4P16L16DL6DL16DL4DL4DL4DL2CP4P8P16');
  456.  
  457.    Delay( 1000 );
  458.  
  459.    Writeln(' Playing William Tell Overture ... ');
  460.  
  461.    PibPlaySet;
  462.    PibPlay('L16T155');
  463.    PibPlay('o2mnb4p8msbbmnb4p8msbbb8g#8');
  464.    PibPlay('e8g#8b8g#8b8o3e8o2b8g#8e8g#8');
  465.    PibPlay('b8g#8b8o3e8o2mnb4p8msbbmnb4');
  466.    PibPlay('p8msbbmnb4p8msbbmnb4p8msbb');
  467.    PibPlay('b8bbb8b8b8bbb8b8b8bb');
  468.    PibPlay('b8b8b8bbb8b8mlb2');
  469.    PibPlay('b2b8p8p4p4');
  470.    PibPlay('p8mso1bbb8bbb8bbo2e8f#8g#8o1bb');
  471.    PibPlay('b8bbo2e8g#g#f#8d#8o1b8bbb8bb');
  472.    PibPlay('b8bbo2e8f#8g#8eg#mlb4bmsag#f#');
  473.    PibPlay('e8g#8e8o3bbb8bbb8bbo4e8f#8');
  474.    PibPlay('g#8o3bbb8bbo4e8g#g#f#8d#8o3b8bb');
  475.    PibPlay('b8bbb8bbo4e8f#8g#8mleg#b4');
  476.    PibPlay('bag#f#mse8g#8e8o3g#g#g#8g#g#g#8g#g#');
  477.    PibPlay('g#8o4c#8o3g#8o4c#8o3g#8o4c#8o3g#8f#8e8d#8');
  478.    PibPlay('c#8g#g#g#8g#g#g#8g#g#g#8o4c#8o3g#8o4c#8');
  479.    PibPlay('o3g#8o4c#8o3b8a#8b8a#8b8g#g#g#8g#g#');
  480.    PibPlay('g#8g#g#g#8o4c#8o3g#8o4c#8o3g#8o4c#8o3g#8f#8');
  481.    PibPlay('e8d#8c#8g#g#g#8g#g#g#8g#g#g#8o4c#8');
  482.    PibPlay('o3g#8o4c#8o3g#8o4c#8o3b8a#8b8o2bbb8f#f#');
  483.    PibPlay('f#8f#f#f#8g#8a8f#4mna8msg#8mne4');
  484.    PibPlay('msg#8f#8f#8f#8o3f#f#f#8f#f#f#8g#8');
  485.    PibPlay('a8mnf#4msa8g#8mne4msg#8f#8o2bb');
  486.    PibPlay('b8o1bbb8bbb8bbo2mne8f#8g#8o1bb');
  487.    PibPlay('b8bbo2e8g#g#f#8d#8o1b8bbb8bb');
  488.    PibPlay('b8bbo2e8f#8g#8eg#mlb4mnbag#f#');
  489.    PibPlay('e8g#8e8o3bbb8bbb8bbo4e8f#8');
  490.    PibPlay('g#8o3bbb8bbo4e8g#g#f#8d#8o3b8bb');
  491.    PibPlay('b8bbb8bbo4e8f#8g#8mleg#mlb4');
  492.    PibPlay('mnbag#f#mne8g#8e8o3mle56f56g56a56b56o4c56d56mne8eee8e8g#4.');
  493.    PibPlay('f#8e8d#8e8c#8mso3bo4c#o3bo4c#o3b');
  494.    PibPlay('o4c#d#eo3abababo4c#d#o3g#ag#ag#abo4c#o3f#');
  495.    PibPlay('g#f#g#f#g#f#g#f#g#f#d#o2bo3mlbo4c#d#e8d#8e8');
  496.    PibPlay('c#8o3msbo4c#o3bo4c#o3bo4c#d#eo3abababo4c#d#o3g#');
  497.    PibPlay('ag#ag#abo4c#o3f#g#f#g#f#af#emne8p8mlc#4');
  498.    PibPlay('mnc#o2cmso3c#o2co3d#c#o2baag#ec#c#c#c#c#e');
  499.    PibPlay('d#o1cg#g#g#g#g#g#o2c#eg#o3c#c#c#c#c#o2co3c#o2co3d#');
  500.    PibPlay('c#o2baag#ec#c#c#c#c#ed#o1cg#g#g#g#g#mng#');
  501.    PibPlay('o2c#eg#o3msc#ed#c#d#o2cg#g#g#o3g#ec#d#o2cg#g#g#');
  502.    PibPlay('o3g#ec#d#o2bg#g#a#gd#d#g#gg#gg#ag#f#e');
  503.    PibPlay('o1ba#bo2eo1bo2f#o1bo2g#ed#eg#eaf#bo3g#f#ed#');
  504.    PibPlay('f#ec#o2bo3c#o2bo3c#d#ef#g#o2ababo3c#d#ef#o2g#');
  505.    PibPlay('ag#aco3c#d#eo2f#g#f#g#f#g#f#g#f#g#f#d#o1b');
  506.    PibPlay('co2c#d#eo1ba#bo2eo1bo2f#o1bo2g#ed#eg#eaf#b');
  507.    PibPlay('o3g#f#ed#f#ec#o2bo3c#o2bo3c#d#ef#g#o2ababo3c#');
  508.    PibPlay('d#ef#o2g#ag#abo3c#d#eo2f#o3c#o2co3c#d#c#o2af#mne');
  509.    PibPlay('o3mlef#g#abo4c#d#mne8mseee8e8g#4.');
  510.    PibPlay('msf8mse8d#8e8c#8o3bo4c#o3bo4c#o3bo4c#d#eo3a');
  511.    PibPlay('bababo4c#d#o3g#ag#ag#abo4c#o3f#g#f#g#f#');
  512.    PibPlay('g#f#g#f#g#f#d#o2bo3mlbo4c#d#mne8eee8e8g#4.');
  513.    PibPlay('msf#8e8d#8e8c#8o3bo4c#o3bo4c#o3b');
  514.    PibPlay('o4c#d#eo3abababo4c#d#o3g#ag#ag#abo4c#o3f#');
  515.    PibPlay('g#f#g#f#ag#f#e8o2b8o3e8g#g#g#8mng#g#g#8');
  516.    PibPlay('g#g#g#8o4c#8o3g#8o4c#8o3g#8o4c#8o3g#8f#8e8');
  517.    PibPlay('d#8c#8g#g#g#8g#g#g#8g#g#g#8o4c#8o3g#8');
  518.    PibPlay('o4c#8o3g#8o4c#8o3b8a#8b8a#8b8g#g#g#8');
  519.    PibPlay('g#g#g#8g#g#g#8o4c#8o3g#8o4c#8o3g#8o4c#8o3g#8');
  520.    PibPlay('f#8e8d#8c#8g#g#g#8g#g#g#8g#g#g#8');
  521.    PibPlay('o4c#8o3g#8o4c#8o3g#8o4c#8o3b8a#8b8a#8b8');
  522.    PibPlay('o2f#f#f#8f#f#f#8g#8a8f#4a8g#8');
  523.    PibPlay('e4g#8f#8o0b8o1b8o2f#f#f#8f#f#f#8');
  524.    PibPlay('g#8a8f#4a8g#8e4g#8f#8');
  525.    PibPlay('bbb8o1bbb8bbb8bbo2e8f#8g#8');
  526.    PibPlay('o1bbb8bbo2e8g#g#f#8d#8o1b8bbb8');
  527.    PibPlay('bbb8bbo2e8f#8g#8eg#mlb4mnb');
  528.    PibPlay('ag#f#e8o1b8o2e8o3bbb8bbb8bbo4e8');
  529.    PibPlay('f#8g#8o3bbb8bbo4e8g#g#f#8d#8o3b8');
  530.    PibPlay('bbb8bbb8bbo4e8f#8g#8o3eg#mlb4');
  531.    PibPlay('mnbag#f#mlef#g#mnamlg#abo4mnc#mlo3bo4c#d#mnemld#');
  532.    PibPlay('ef#mng#ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bmle');
  533.    PibPlay('f#g#mnamlg#abmno4c#mlo3bo4c#d#mnemld#ef#mng#ao3bo4ao3bo4a');
  534.    PibPlay('o3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bp16mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16');
  535.    PibPlay('mleo4eo3mnep16mlao4ao3mnap16mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16');
  536.    PibPlay('mlao4ao3mnao4go3go4go3go4go3go4go3go4msg8e8c8e8o4mng#');
  537.    PibPlay('o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4msg#8e8o3b8o4e8mng#o3g#o4g#o3g#o4g#');
  538.    PibPlay('o3g#o4g#o3g#o4msg#8f8c#8f8mna#o3a#o4a#o3a#o4a#o3a#o4a#o3a#o4msa#8');
  539.    PibPlay('g8e8g8b8p16mna#p16ap16g#p16f#p16ep16');
  540.    PibPlay('d#p16c#p16o3bp16a#p16ap16g#p16f#p16ep16d#p16f#mle');
  541.    PibPlay('f#g#mnamlg#abmno4c#o3mlbo4c#d#mnemld#ef#mng#ao3bo4ao3bo4a');
  542.    PibPlay('o3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bmlef#g#mnamlg#abmno4c#o3mlb');
  543.    PibPlay('o4c#d#mnemld#ef#mng#ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4a');
  544.    PibPlay('o3bo4ao3bp16mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnap16');
  545.    PibPlay('mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnao4go3go4go3go4g');
  546.    PibPlay('o3go4go3go4g8e8c8e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4g#8');
  547.    PibPlay('e8o3b8o4e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4msg#8mnf8c#8');
  548.    PibPlay('f8a#o3a#o4a#o3a#o4a#o3a#o4a#o3a#o4a#8g8e8g8b8');
  549.    PibPlay('p16a#p16ap16g#p16f#p16ep16d#p16c#p16o3bp16a#p16');
  550.    PibPlay('ap16g#p16f#p16ep16d#p16fmled#ed#mne8bbb8');
  551.    PibPlay('bbb8bbo4e8f#8g#8o3bbb8bbb8');
  552.    PibPlay('bbo4g#8a8b8p8e8f#8g#8p8o3g#8');
  553.    PibPlay('a8b8p8p2o2bco3c#dd#');
  554.    PibPlay('eff#gg#aa#bco4c#d#ed#f#d#ed#f#d#e');
  555.    PibPlay('d#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#e');
  556.    PibPlay('d#f#d#e8eo3eo4eo3eo4eo3eo4e8o3bo2bo3bo2bo3bo2bo3b8');
  557.    PibPlay('g#o2g#o3g#o2g#o3g#o2g#o3g8eo2eo3eo2eo3eo2eo3e8eee8');
  558.    PibPlay('e8e8o2bbb8b8b8g#g#g#8g#8g#8');
  559.    PibPlay('eee8e8e8o1b8o2e8o1b8o2g#8e8b8');
  560.    PibPlay('g#8o3e8o2b8o3e8o2b8o3g#8e8b8g#8o4e4');
  561.    PibPlay('p8eee8e8e8e8e4p8.');
  562.    PibPlay('ee4p8.o2ee2');
  563.  
  564. End   (* PibMusic *).